import { getDictItemApi } from "@renderer/api/dicts";
import { Dicts } from "@renderer/interface/dicts";
import { ref } from "vue";

export function useDicts(data: string[]) {

	const dicts = ref<Dicts>({
		system_global_status: [],
		system_global_gender: [],
		crm_class_status: [],
		crm_teaching_method: [],
		recruit_customer_level: [],
		recruit_education_background: [],
		recruit_follow_method: [],
		recruit_dealStatus: []
	})

	const getDicts = async () => {
		const res = await getDictItemApi(data)
		dicts.value = res.data
	}

	getDicts()

	return { dicts }
}